//
//  APIRequesstBase.h
//  mmspc
//
//  Created by list on 2017/9/25.
//  Copyright © 2017年 com.abc.mmsp. All rights reserved.
//

#import "YTKRequest.h"
#import "ShellAPIResponse.h"

typedef void(^ABCAPIResponseBlock)(__kindof ShellAPIResponse * _Nullable request);

@protocol APIRequestDelegate <NSObject>

@optional
- (void)requestFinished:(__kindof ShellAPIResponse *_Nullable)response;
- (void)requestFailed:(__kindof ShellAPIResponse *_Nullable)response;

@end

@interface APIRequesstBase : YTKRequest
- (void)startRequestWithBlockSuccess:(nullable ABCAPIResponseBlock)success
                                    failure:(nullable ABCAPIResponseBlock)failure;
- (void)startRequestWithHideAlertWhenFinish:(BOOL)hidden success:(nullable ABCAPIResponseBlock)success
failure:(nullable ABCAPIResponseBlock)failure;

- (void)requestCookie;
@property (nonatomic, copy, nullable) ABCAPIResponseBlock successResponseBlock;
@property (nonatomic, copy, nullable) ABCAPIResponseBlock failureResponseBlock;


@end
